package com.maixy.dailydemo.algorithm.audition;

/**
 * @ClassName ReverseString
 * @Description TODO
 * @Date 2021/3/2 10:50
 * @Author maixy
 */
public class ReverseString {
    public static void main(String[] args) {
        String str = "abc";
        StringBuilder result = new StringBuilder();
        char[] chars = str.toCharArray();
        for (int i = chars.length - 1; i >= 0; i--) {
            result.append(chars[i]);
        }
        System.out.println(result);
    }
}
